home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wildcat Files 2
/
The Wildcat Files 2 (Arsenal Computer).ISO
/
qm-util
/
pcb-mm.scr
< prev
next >
Wrap
Text File
|
1994-04-02
|
9KB
|
174 lines
; This script will make an unattended mail run to pick up PCBoard MarkMail door
; mail and send any new mail waiting to be sent. Make sure you edit DIALTXT,
; NAME, MAXTRIES, and TCLOGOFF in the DEFINITIONS section (leave UDONE and
; DDONE alone) to meet your requirements! Add your NAME, Password, and the
; name of the BBS your calling in the DEFINITIONS section of the script. Add
; the PCB Conference # and MarkMail door command to the MAIN BODY section.
;
; IMPORTANT: You must have HotKeys turned off and Expert mode turned on in
; your user profile on the BBS, and also make sure the packet name, .QWK
; download path, and .REP upload path are defined in the FON book entry for
; the system you will be calling before using this script.
;
; Modified from the script listed in the QmodemPro 1.00 manual. Then modified
; again for MarkMail. Feel free to make any modifications you wish. If you
; make it better, then share it with everyone else!
;
TurnOn 8_BIT
TurnOff LINEFEED
TurnOff XON/XOFF
TurnOff NOISE
TurnOff MUSIC
TurnOn SCROLL
TurnOff PRINT
TurnOff ECHO
Capture MAILRUN.CAP
Log MAILRUN.LOG
;
; ------------------------ DEFINITIONS -------------------------
;
String NAME UDONE DDONE DOOR MAXTRIES FONTXT TCLOGOFF DIALTXT
Assign DIALTXT "Text From BBS dial entry" ; unique text string from FON file
Assign NAME "First Last Password" ; Name and Password on BBS
Assign UDONE N ; Upload done?
Assign DDONE N ; Download done?
Assign MAXTRIES 5 ; Maximum attempts to connect
Assign TCLOGOFF N ; set this to Y if you have logoff
; after upload set to Y in MarkMail,
; N if you do not
;
; --------------------- END DEFINITIONS ------------------------
;
Restart: ; Go here if the connection gets
; broken then stamp log
Stamp NO CARRIER detected, restarting script
; Notes:
; The DIAL command uses the ability to call a specific number, without
; knowing the exact position in the .FON file. The example DIALTXT set up
; in this script will search the .FON file for the text "MSI HQ". By using
; the Text dial option and specifying this, it will dial this number even
; if the FON book is sorted. Note the 'T' prefix in the DIAL line below...
;-----
; Dial section starts here
;-----
Decr MAXTRIES ; decrement the counter
If "$MAXTRIES" = "0" TooManyTries ; if none left goto TooManyTries
If $ONLINE SkipDial ; skip the dial if online already
Dial "T$DIALTXT" ; dial selected entry
SkipDial:
TimeOut 1200 OutOfTime ; set Waitfor timeout to 1200 seconds
Goto Top ; jump to start of main body
OutOfTime: ; come here if something times out
Hangup ; hang up the phone
Delay 5000 ; wait 5 seconds
Hangup ; hang up again (just in case)
Delay 5000 ; wait 5 seconds
Goto Restart ; start over again
;-----
; Main Body starts here
;-----
Top: ; label for main body of script
When "NO CARRIER" Restart ; goto label restart if fails
When "left) (H)elp, More?" "^M" ; Continue passed logon notices
When " (Enter)=no?" "^M" ; Continue passed Language or
; ; Graphics questions.
Waitfor "first name?" ; wait for first name prompt
Delay 100 ; delay .1 second
Send "$NAME^M" ; send text from Define section
Waitfor "COMMAND?" ; Main menu prompt
delay 100
Send "Join 38^M" ; Join mail conf (Edit if needed)
Waitfor "COMMAND?"
delay 100
Send "Door 1^M" ; Command to open MarkMail (Edit)
Waitfor "MarkMail Command?" ; wait for the MarkMail menu prompt
;-----
CmdLoop: ; label for command loop
If "$DDONE" = "N" DoDownload ; download not done, do it
If "$UDONE" = "N" DoUpload ; upload not done, do it
Goto AllDoneN ; only if both of above are done
;-----
DoDownload: ; label for download section
When "Sorry, No Messages Found..." DownloadOK ; go to label if no msgs
; ; to download
Send "^M" ; send ENTER for check
Waitfor "MarkMail Command?" ; wait for menu again
Delay 2000 ; wait 2 seconds
Send "D^M" ; send D ENTER for download
Waitfor "bye When Done?" ; wait until packet is ready
Delay 100 ; delay .1 second
Send "Y^M" ; answer Y ENTER
Waitfor "$PACKET.QWK" ; wait until it's ready to send
Stamp Beginning download of $QWKPATH$PACKET.QWK ; stamp log
Download Z $QWKPATH$PACKET.QWK ; start the download
If $SUCCESS DownloadOK ; if ok, branch to label
Stamp Download FAILED ; make note in log that it failed
Goto DoDownload ; and do it again
;-----
DownloadOK: ; label for OK downloads
Stamp Download successful or no mail found ; make note in log of what happened
Assign DDONE Y ; change download flag to Y
Goto CmdLoop ; branch back to Command Loop
;-----
DoUpload: ; label for upload section
Delay 2000 ; wait for 2 seconds
Send "^M" ; send ENTER key
Waitfor "MarkMail Command?" ; wait for MarkMail menu prompt
Delay 100 ; wait .1 second
Exist $REPPATH$PACKET.REP SendMsgs ; if there are messages to send then
; goto SendMsgs
Assign UDONE Y ; if no messages to send, flag that
; uploading is done
Goto CmdLoop ; and branch back to Command Loop
;-----
SendMsgs: ; label for SendMsgs section
Send "U^M" ; send U ENTER
Waitfor "$PACKET.REP" ; wait until MarkMail is ready
Pause 1000 ; wait 1 second
Upload Z $REPPATH$PACKET.REP ; start the upload
If $FAIL DoUpload ; if not OK then do it again
;DeleteF $REPPATH$PACKET.REP ; delete the .rep file
;If "$TCLOGOFF" = "Y" AllDoneY ; if MarMail set to logoff after upload
; branch to AllDoneY
Assign UDONE Y ; set upload flag to Y
;-----
AllDoneN: ; label when up and downloads are done
When ; cancels all previous When tracking
Send "^M" ; send ENTER
Waitfor "MarkMail Command?" ; wait for menu
Send "G^M" ; send G ENTER to logoff
Goto EndGame ; branch to EndGame label
;-----
AllDoneY:
When ; stop tracking all previous WHENs
When "Auto Logoff" "H^M" ; send H ENTER to logoff
Assign UDONE Y ; set the upload done flag
;-----
EndGame: ; label for end of script
Hangup ; hangup the modem
Delay 2000 ; wait 2 seconds
Send "ATM0H1^M" ; take modem offhook
TurnOff Log ; close the log file
System Y ; exit back to DOS
Exit ; end of script (if successful)
;-----
TooManyTries:
Stamp "Mail attempt failed..." ; place notice in log file
TurnOff Log ; close the log file
Exit ; end of script (if failure)